<template>
	<view class="title" :style="{'padding-top':statusBarHeight + 10+'px'}">
		<uni-icons @click="back" type="back" size="20"></uni-icons>
		<text style="color: rgb(27, 27, 27);">{{name}}</text>
		<uni-icons type="headphones" size="20"></uni-icons>
		
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	export default {
		props:{
			name:String,
		},
		data() {
			return {
				// 顶部安全距离
				statusBarHeight: 0,
				// 底部安全距离
				safeAreaInsets: 0,
			}
		},
		methods: {
			...mapGetters(['getstatusBarHeight', 'getSaInsetBottom']),
			back() {
				uni.navigateBack({
						delta: 1
				})
			}
		},
		mounted() {
			this.statusBarHeight = this.getstatusBarHeight();
			this.safeAreaInsets = this.getSaInsetBottom();
		}
	}
</script>

<style scoped>
	.title {
		padding: 0 24rpx 18rpx;
		background-color: rgb(246, 246, 246);
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 60rpx;
	}
</style>